package com.example.spring.controller;

import com.example.spring.service.UserService;
import com.example.spring.service.UserServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    UserService userService=new UserServiceImpl();
    @GetMapping("/userlogin")
    public String login(String username,String password){

        String message = userService.login(username, password);
        return message;
    }
    @GetMapping("/userRegister")
    public String register(String username,String password,String newPassword){

        return userService.register(username, password, newPassword);
    }

}
